package com.fc.captcha.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 验证码配置属性类
 */
@ConfigurationProperties(prefix = "captcha")
public class CaptchaProperties {

    /** 是否启用验证码功能，默认true */
    private boolean enabled = true;

    /** 验证码字符集（排除易混淆字符） */
    private String charBase = "23456789ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz";

    /** 验证码长度，默认4位 */
    private int codeLength = 4;

    /** 图片宽度，默认120像素 */
    private int width = 120;

    /** 图片高度，默认40像素 */
    private int height = 40;

    /** 干扰线数量，默认5条 */
    private int lineCount = 5;

    // Getter和Setter方法
    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getCharBase() {
        return charBase;
    }

    public void setCharBase(String charBase) {
        this.charBase = charBase;
    }

    public int getCodeLength() {
        return codeLength;
    }

    public void setCodeLength(int codeLength) {
        this.codeLength = codeLength;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getLineCount() {
        return lineCount;
    }

    public void setLineCount(int lineCount) {
        this.lineCount = lineCount;
    }
}